lcBlockSelBlock Home

Makes new block from selected entities.

 HANDLE lcBlockSelBlock (
   HANDLE hBlock,
   LPCWSTR szName,
   double X,
   double Y,
   int Mode,
   BOOL bOverwrite
 );

Parameters
hBlock
  Handle to a block which contains selected entities.
szName
  Name for the new block.
X Y
  Coordinates of basepoint for the new block.
Mode
  Defines what to do with selected entities after the new block will be created.
Can be one of the following constants:

Value Meaning
LC_BLK_ENT_RETAIN Retain original entities, don't insert the new block
LC_BLK_ENT_CONVERT Delete selected entities, insert the new block
LC_BLK_ENT_DELETE Delete selected entities, don't insert the new block
bOverwrite
  Defines behaviour if a block with name szName already exist:
TRUE - the exist block will be redefined;
FALSE - do not create new block.
This parameter is ignored if a block with name szName do not exist.

Return Value

  If parameter Mode is LC_BLK_ENT_CONVERT, then function returns a handle to inserted Block reference, otherwise returns a handle to the new Block.
Returns NULL if the function fails.

See Also

  Code sample